/* 侧边栏样式 */
.sidebar {
    width: 300px;  /* 默认桌面宽度 */
    padding: 0px 15px 40px 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 2;
}

/* 在media query中覆盖基础样式 */
@media screen and (max-width: 768px) {
    .sidebar {
        width: 100%;  /* 在小屏幕下占满宽度 */
        padding: 0 0;
        max-width: none;  /* 移除最大宽度限制 */
    }
}

/* 个人信息卡片样式 */
.profile-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    padding-top: 55px;
    position: relative;
    box-shadow: var(--shadow);
    text-align: center;
    margin-top: 35px;
}

.avatar-container {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgb(206, 223, 190);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 3;
}

.student-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.student-name {
    font-size: 1.2em;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 12px;
}

.student-bio {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 12px;
}

/* 侧边栏按钮容器样式 */
.profile-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* 侧边栏按钮样式 */
.profile-actions .action-btn {
    display: flex;
    justify-content: center;  /* 居中对齐 */
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    flex: 1;
    max-width: 120px;
}

.profile-actions .edit-btn {
    background: var(--primary-color);
    color: white;
}

.profile-actions .edit-btn:hover {
    background: #3a80d2;
}

.profile-actions .logout-btn {
    background: #f5f5f5;
    color: #666;
}

.profile-actions .logout-btn:hover {
    background: #e8e8e8;
}

/* 导航菜单样式 */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-card {
    background: var(--background-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.nav-card i {
    font-size: 1.4em;
    font-style: normal;
}

.nav-card span {
    font-size: 1em;
    font-weight: 500;
}

.nav-card:hover {
    transform: translateY(-2px);
}

.nav-card.active {
    background: var(--primary-color);
    color: white;
}

/* 移除旧的样式 */
.student-id, .nav-item {
    display: none;
}

/* 头部样式 */
.main-header {
    height: 200px;
    background: rgb(251,249,237);
    box-shadow: var(--shadow);
    border-bottom: 1px solid #e0e9e4;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.header-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.title-text {
    font-size: 2.5em;
    color: #2c5543;
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    text-shadow: 
        2px 2px 0 #fff,
        -2px 2px 0 #fff,
        -2px -2px 0 #fff,
        2px -2px 0 #fff;
}

.header-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-image {
    height: 200px;
    width: auto;
    opacity: 0.7;
}

.main-footer {
    padding: 20px;
    background: white;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    color: var(--text-color);
    font-size: 0.9em;
}

/* 在.notice-title的样式中添加文本溢出处理 */
.notice-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    /* 多行文本溢出处理 */
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2; /* 显示2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    word-break: break-word;
}

/* 确保标题容器也有合适的宽度限制 */
.notice-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    overflow: hidden; /* 防止内容溢出 */
}

/* 如果需要在hover时显示完整标题，可以添加以下样式 */
.notice-title:hover {
    white-space: normal;
    position: relative;
    z-index: 1;
}

/* 帖子内容的文本溢出处理 */
.notice-content {
    /* 多行文本溢出处理 */
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3; /* 显示3行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 8px 0;
}

/* 确保内容容器也有合适的宽度限制 */
.notice-content-wrapper {
    flex: 1;
    min-width: 0; /* 防止flex子��溢出 */
    width: 100%;
}

/* 帖子详情页样式 */
.detail-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    /* 允许标题自动换行 */
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.4;
}

.detail-content {
    /* 允许内容自动换行 */
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    color: #333;
    font-size: 1em;
    line-height: 1.6;
    margin: 16px 0;
    max-width: 100%;
}

/* 确保详情页的容器也有合适的宽度限制 */
.detail-header {
    width: 100%;
    overflow: hidden;
}

.detail-title-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

/* 详情页的媒体内容容器 */
.detail-media-container {
    width: 100%;
    overflow: hidden;
    margin: 16px 0;
}

.detail-media {
    max-width: 100%;
}

.detail-media img,
.detail-media video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 评论区样式 */
.comment-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.5;
    color: #333;
} 